OSGWindows Class Reference

#include <OsgWindows.h>

List of all members.

Public Member Functions

 OSGWindows ()
int getCurrentFrameId ()
void setCurrentFrameId (int id)
void setOnDisplayFrameId (int id)
void setClickedFrameId (int id)
osg::ref_ptr< osgProducer::Viewer > getViewer ()
void loadFrame (int clickedFrameId)
void clearFrames (void)
void addObject (TraffEduObject *obj)
vector< TraffEduObject * > getObjects (void)
vector< Frame * > & getFrames (void)
void doDeleteGeode (TraffEduObject *obj)
void doAddGeode (TraffEduObject *obj)
osg::ref_ptr< osg::Group > getConstantRoot ()
osg::ref_ptr< osg::Group > getTextRoot ()
int sizeOfFrames ()
Frame * getCurrentFrame ()
void sortFrames ()
int returnIndex (int id)
vector< textperFrame * > & getTextArray ()
void clickedOnAFrame (int frameId)
void changeCurrentFrame (int frameId, int oldonDisplayFrameId)
void displayAFrame (int frameId)
void addNewFrame ()
void deleteFrame ()
int findReferenceFrame (int id)
bool canAddNewFrame ()
bool canDeleteAFrame ()
int getOnDisplayFrameId ()
void addCommandDelete ()
void addCommandDelete (TraffEduObject *obj)
void addCommandCut ()
void addCommandCut (TraffEduObject *obj)
void addCommandCopy (void)
void addCommandCopy (TraffEduObject *obj)
void addCommandPaste (osg::Vec3 pos)
void addCommandSelect (int isMultipleSelection, TraffEduObject *obj)
void addCommandSelectAll ()
void addCommandDeselectAll ()
void addCommandDeselect (TraffEduObject *obj)
void addCommandInsertTrafficLight (osg::Vec3 pos, TrafficLightTypes newType=NORMAL_ISIK, TrafficLightColor newColor=YESIL, TrafficLightColor newArrowColor=YESIL)
void addCommandInsertTrafficSign (osg::Vec3 pos, TrafficSignTypes newType=DIKKAT)
void addCommandInsertVehicle (osg::Vec3 pos, string pathname, float scale)
void addCommandInsertEnvObj (osg::Vec3 pos, string pathname, float scale)
void addCommandRotate (float angle)
void addCommandRotate (float angle, TraffEduObject *obj)
void addCommandTranslate (TraffEduObject *obj, osg::Vec3 old_position, osg::Vec3 new_position)
void dropUnselectedObject (TraffEduObject *obj)
bool canUndo ()
bool canRedo ()
void undo ()
void redo ()
BOOL isModified ()
void setSelectedObjects (TraffEduObject *obj)
vector< TraffEduObject * > getSelectedObjects (void)
void setCutObjects (void)
void setCutObjects (TraffEduObject *obj)
vector< TraffEduObject * > getCutObjects (void)
vector< TraffEduObject * > getCopiedObjects (void)
void clearSelectedObjects (void)
void clearCopiedObjects (void)
void clearCutObjects (void)
void setCopiedObjects (void)
void setCopiedObjects (TraffEduObject *obj)
void fillSelectedObjects (void)
void clearObjects (void)
bool getAudioFlag ()

Public Attributes

bool m_b_AudioInserted

Private Attributes

vector< Frame * > frames
vector< TraffEduObject * > objects
vector< textperFrame * > textArray
int currentFrameNum
Frame * currentFrame
osg::ref_ptr< osgProducer::Viewer > viewer
osg::ref_ptr< osg::Group > mainRoot
osg::ref_ptr< osg::Group > textRoot
int clickedFrameId
int onDisplayFrameId
GUICommandManager * eventHandler
vector< TraffEduObject * > selectedObjects
vector< TraffEduObject * > copiedObjects
vector< TraffEduObject * > cutObjects


Detailed Description

A OsgWindows class.This class is used for holding information about the keyframes and performing operations for constructing traffic cases.

Definition at line 7 of file OsgWindows.h.


Constructor & Destructor Documentation

OSGWindows::OSGWindows (   ) 
 

A constructor. Initializes the all the private variables.

Definition at line 2 of file OsgWindows.cpp.

References clickedFrameId, currentFrameNum, eventHandler, m_b_AudioInserted, mainRoot, onDisplayFrameId, GUICommandManager::setUndoLevel(), textRoot, and viewer.


Member Function Documentation

void OSGWindows::addCommandCopy (  TraffEduObject *  obj  ) 
 

creates a CommandCopy object and awakes the GUICommandManager about this operation.

Parameters:
obj a TraffEduObject pointer.

Definition at line 433 of file OsgWindows.cpp.

References CommandCopy::execute(), and osgwind.

void OSGWindows::addCommandCopy (  void   ) 
 

creates a CommandCopy object and awakes the GUICommandManager about this operation.

Definition at line 427 of file OsgWindows.cpp.

References CommandCopy::execute(), and osgwind.

Referenced by RightView::OnObjectrightmenuCopy().

void OSGWindows::addCommandCut (  TraffEduObject *  obj  ) 
 

creates a CommandCut object and awakes the GUICommandManager about this operation.

Parameters:
obj a TraffEduObject pointer.

Definition at line 420 of file OsgWindows.cpp.

References GUICommandManager::DoCommand(), eventHandler, and osgwind.

void OSGWindows::addCommandCut (   ) 
 

creates a CommandCut object and awakes the GUICommandManager about this operation.

Definition at line 413 of file OsgWindows.cpp.

References GUICommandManager::DoCommand(), eventHandler, and osgwind.

Referenced by RightView::OnObjectrightmenuCut().

void OSGWindows::addCommandDelete (  TraffEduObject *  obj  ) 
 

creates a CommandDelete object and awakes the GUICommandManager about this operation.

Parameters:
obj a TraffEduObject pointer.

Definition at line 404 of file OsgWindows.cpp.

References GUICommandManager::DoCommand(), eventHandler, and osgwind.

void OSGWindows::addCommandDelete (   ) 
 

creates a CommandDelete object and awakes the GUICommandManager about this operation.

Definition at line 394 of file OsgWindows.cpp.

References GUICommandManager::DoCommand(), eventHandler, and osgwind.

Referenced by RightView::OnObjectrightmenuDelete().

void OSGWindows::addCommandDeselect (  TraffEduObject *  obj  ) 
 

creates a CommandDeselect object and awakes the GUICommandManager about this operation.

Parameters:
obj a TraffEduObject pointer.

Definition at line 468 of file OsgWindows.cpp.

References CommandDeselect::execute(), and osgwind.

void OSGWindows::addCommandDeselectAll (   ) 
 

creates a CommandDeselectAll object and awakes the GUICommandManager about this operation.

Definition at line 461 of file OsgWindows.cpp.

References CommandDeselectAll::execute(), and osgwind.

Referenced by AnimationWindow::deselectAll(), and OSGEventHandler::rightClickMenu().

void OSGWindows::addCommandInsertEnvObj (  osg::Vec3  pos,
string  pathname,
float  scale
) 
 

creates a CommandInsertEnvObj object and awakes the GUICommandManager about this operation.

Parameters:
pos a osg::Vec3 argument.
pathname a string argument.
scale a float argument.

Definition at line 501 of file OsgWindows.cpp.

References GUICommandManager::DoCommand(), eventHandler, and osgwind.

Referenced by OSGEventHandler::drawBuilding(), OSGEventHandler::drawTree(), and RightView::OnEnvironmentalobjectHouse32909().

void OSGWindows::addCommandInsertTrafficLight (  osg::Vec3  pos,
TrafficLightTypes  newType = NORMAL_ISIK,
TrafficLightColor  newColor = YESIL,
TrafficLightColor  newArrowColor = YESIL
) 
 

creates a CommandInsertTrafficLight object and awakes the GUICommandManager about this operation.

Parameters:
pos a osg::Vec3 argument.
newType a TrafficLightTypes argument
newColor a TrafficLightColor argument
newArrowColor a TrafficLightColor argument

Definition at line 475 of file OsgWindows.cpp.

References GUICommandManager::DoCommand(), eventHandler, and osgwind.

Referenced by OSGEventHandler::drawLight(), RightView::OnTrafficlightGreen(), RightView::OnTrafficlightRed(), and RightView::OnTrafficlightYellow().

void OSGWindows::addCommandInsertTrafficSign (  osg::Vec3  pos,
TrafficSignTypes  newType = DIKKAT
) 
 

creates a CommandInsertTrafficSign object and awakes the GUICommandManager about this operation.

Parameters:
pos a osg::Vec3 argument.
newType a TrafficSignTypes argument.

Definition at line 484 of file OsgWindows.cpp.

References GUICommandManager::DoCommand(), eventHandler, and osgwind.

Referenced by OSGEventHandler::drawSign(), RightView::OnDikkat(), RightView::OnTrafficsignAda(), RightView::OnTrafficsignIlerimecburiyon32950(), RightView::OnTrafficsignIlerimecburiyon32967(), RightView::OnTrafficsignIlerivasagamecburiyon32951(), RightView::OnTrafficsignIlerivasagamecburiyon32968(), RightView::OnTrafficsignIlerivesolamecburiyon32952(), RightView::OnTrafficsignIlerivesolamecburiyon32969(), RightView::OnTrafficsignIsikliisaretcihazi32932(), RightView::OnTrafficsignOndekitasitigecmekyasaktir32947(), RightView::OnTrafficsignOndekitasitigecmekyasaktir32964(), RightView::OnTrafficsignSagadonulmez32944(), RightView::OnTrafficsignSagadonulmez32961(), RightView::OnTrafficsignSagamecburiyon32948(), RightView::OnTrafficsignSagamecburiyon32965(), RightView::OnTrafficsignSaganayol32937(), RightView::OnTrafficsignSaganayol32959(), RightView::OnTrafficsignSagasureklitehlikeliviraj32935(), RightView::OnTrafficsignSagasureklitehlikeliviraj32958(), RightView::OnTrafficsignSagatehlikeliviraj32933(), RightView::OnTrafficsignSoladonulmez32945(), RightView::OnTrafficsignSoladonulmez32962(), RightView::OnTrafficsignSolamecburiyon32949(), RightView::OnTrafficsignSolamecburiyon32966(), RightView::OnTrafficsignSolanayol32942(), RightView::OnTrafficsignSolanayol32960(), RightView::OnTrafficsignSolasureklitehlikeliviraj32936(), RightView::OnTrafficsignSolasureklitehlikeliviraj32956(), RightView::OnTrafficsignSolatehlikeliviraj32957(), RightView::OnTrafficsignUdonusuyapilmaz32946(), RightView::OnTrafficsignUdonusuyapilmaz32963(), and RightView::OnTrafficsignYolver32931().

void OSGWindows::addCommandInsertVehicle (  osg::Vec3  pos,
string  pathname,
float  scale
) 
 

creates a CommandInsertVehicle object and awakes the GUICommandManager about this operation.

Parameters:
pos a osg::Vec3 argument.
pathname a string argument.
scale a float argument.

Definition at line 494 of file OsgWindows.cpp.

References GUICommandManager::DoCommand(), eventHandler, and osgwind.

Referenced by OSGEventHandler::drawVehicleDodge(), OSGEventHandler::drawVehicleSemi(), RightView::OnVehicleAutomobile(), RightView::OnVehicleKamyon(), and RightView::OnVehicleTruck().

void OSGWindows::addCommandPaste (  osg::Vec3  pos  ) 
 

creates a CommandPaste object and awakes the GUICommandManager about this operation.

Definition at line 439 of file OsgWindows.cpp.

References GUICommandManager::DoCommand(), eventHandler, and osgwind.

Referenced by RightView::OnFreeplacerightmenuPaste().

void OSGWindows::addCommandRotate (  float  angle,
TraffEduObject *  obj
) 
 

creates a CommandRotate object and awakes the GUICommandManager about this operation.

Parameters:
angle a float argument.
obj a TraffEduObject pointer.

Definition at line 515 of file OsgWindows.cpp.

References GUICommandManager::DoCommand(), eventHandler, and osgwind.

void OSGWindows::addCommandRotate (  float  angle  ) 
 

creates a CommandRotate object and awakes the GUICommandManager about this operation.

Parameters:
angle a float argument.

Definition at line 508 of file OsgWindows.cpp.

References GUICommandManager::DoCommand(), eventHandler, and osgwind.

Referenced by RightView::OnObjectrightmenuRotate().

void OSGWindows::addCommandSelect (  int  isMultipleSelection,
TraffEduObject *  obj
) 
 

creates a CommandSelect object and awakes the GUICommandManager about this operation.

Parameters:
isMultipleSelection an integer argument.
obj a TraffEduObject pointer.

Definition at line 446 of file OsgWindows.cpp.

References CommandSelect::execute(), and osgwind.

Referenced by OSGEventHandler::select().

void OSGWindows::addCommandSelectAll (   ) 
 

creates a CommandSelectAll object and awakes the GUICommandManager about this operation.

Definition at line 453 of file OsgWindows.cpp.

References CommandSelectAll::execute(), and osgwind.

void OSGWindows::addCommandTranslate (  TraffEduObject *  obj,
osg::Vec3  old_position,
osg::Vec3  new_position
) 
 

creates a CommandTranslate object and awakes the GUICommandManager about this operation.

Parameters:
obj a TraffEduObject pointer.
old_position a osg::Vec3 argument.
new_position a osg::Vec3 argument.

Definition at line 522 of file OsgWindows.cpp.

References GUICommandManager::DoCommand(), eventHandler, and osgwind.

Referenced by OSGEventHandler::handle().

void OSGWindows::addNewFrame (   ) 
 

creates a new key frame and pushes it to the frames vector when the user inserts a new frame from the menubar.

Definition at line 215 of file OsgWindows.cpp.

References clickedFrameId, currentFrameNum, frames, getConstantRoot(), objects, osgwind, sortFrames(), and VEHICLE.

void OSGWindows::addObject (  TraffEduObject *  obj  ) 
 

adds a new object to the objects vector.

Parameters:
obj a TraffEduObject pointer.

Definition at line 38 of file OsgWindows.cpp.

References objects.

Referenced by CommandInsertEnvObj::CommandInsertEnvObj(), CommandInsertTrafficLight::CommandInsertTrafficLight(), CommandInsertTrafficSign::CommandInsertTrafficSign(), CommandInsertVehicle::CommandInsertVehicle(), and CommandPaste::CommandPaste().

bool OSGWindows::canAddNewFrame (   ) 
 

shows if it is possible to add a new key frame to the environment.

Returns:
The test result

Definition at line 371 of file OsgWindows.cpp.

References clickedFrameId, currentFrameNum, and frames.

bool OSGWindows::canDeleteAFrame (   ) 
 

shows if it is possible to delete a key frame from the environment.

Returns:
The test result

Definition at line 380 of file OsgWindows.cpp.

References clickedFrameId, currentFrameNum, and frames.

bool OSGWindows::canRedo (   ) 
 

a member method showing if redo operation can be performed.

Returns:
Test result

Definition at line 534 of file OsgWindows.cpp.

References GUICommandManager::CanRedo(), and eventHandler.

bool OSGWindows::canUndo (   ) 
 

a member method showing if undo operation can be performed.

Returns:
Test result

Definition at line 528 of file OsgWindows.cpp.

References GUICommandManager::CanUndo(), and eventHandler.

void OSGWindows::changeCurrentFrame (  int  frameId,
int  oldonDisplayFrameId
) 
 

changes current frame, make its root draw, and make the environment editable.

Parameters:
frameId an integer argument.
oldonDisplayFrameId an integer argument.

Definition at line 139 of file OsgWindows.cpp.

References currentFrameNum, getConstantRoot(), objects, onDisplayFrameId, osgwind, and VEHICLE.

Referenced by clickedOnAFrame().

void OSGWindows::clearCopiedObjects (  void   ) 
 

clears the copied objects vector.

Definition at line 614 of file OsgWindows.cpp.

References copiedObjects.

Referenced by CommandCut::execute(), CommandCopy::execute(), and FileHandler::loadFile().

void OSGWindows::clearCutObjects (  void   ) 
 

clears the cut objects vector.

Definition at line 619 of file OsgWindows.cpp.

References cutObjects.

Referenced by CommandCut::execute(), FileHandler::loadFile(), and CommandCut::unexecute().

void OSGWindows::clearFrames (  void   ) 
 

clears all the keyframes from the environment.

Definition at line 609 of file OsgWindows.cpp.

References frames.

Referenced by FileHandler::loadFile().

void OSGWindows::clearObjects (  void   ) 
 

clears the objects vector.

Definition at line 648 of file OsgWindows.cpp.

References objects.

void OSGWindows::clearSelectedObjects (  void   ) 
 

clears the selected objects vector.

Definition at line 604 of file OsgWindows.cpp.

References selectedObjects.

Referenced by CommandSelect::execute(), CommandDelete::execute(), and FileHandler::loadFile().

void OSGWindows::clickedOnAFrame (  int  frameId  ) 
 

decides which keyframe root should be drawn to the scene and make it draw.

Parameters:
frameId an integer argument.

Definition at line 125 of file OsgWindows.cpp.

References changeCurrentFrame(), clickedFrameId, displayAFrame(), findReferenceFrame(), and onDisplayFrameId.

Referenced by TimelineEventHandler::select().

void OSGWindows::deleteFrame (   ) 
 

removes the current frame from the frames vector when the user deletes a frame from the menubar.

Definition at line 274 of file OsgWindows.cpp.

References GUICommandManager::Clear(), currentFrameNum, eventHandler, frames, mainRoot, objects, and onDisplayFrameId.

void OSGWindows::displayAFrame (  int  frameId  ) 
 

makes root of any frame,which is not current frame draw, and make the environment non_editable.

Parameters:
frameId an integer argument.

Definition at line 185 of file OsgWindows.cpp.

References currentFrameNum, and frames.

Referenced by clickedOnAFrame().

void OSGWindows::doAddGeode (  TraffEduObject *  obj  ) 
 

adds the geode of the given object to the scene root.

Parameters:
obj a TraffEduObject pointer.

Definition at line 60 of file OsgWindows.cpp.

References TraffEduObject::getIsBeforeCreated(), TraffEduObject::getObjectId(), mainRoot, and objects.

Referenced by CommandPaste::execute(), CommandInsertVehicle::execute(), CommandInsertTrafficSign::execute(), CommandInsertTrafficLight::execute(), CommandInsertEnvObj::execute(), CommandDelete::unexecute(), and CommandCut::unexecute().

void OSGWindows::doDeleteGeode (  TraffEduObject *  obj  ) 
 

deletes the geode of the given object from the scene root.

Parameters:
obj a TraffEduObject pointer.

Definition at line 53 of file OsgWindows.cpp.

References TraffEduObject::getObjectId(), mainRoot, and objects.

Referenced by CommandDelete::execute(), CommandCut::execute(), CommandPaste::unexecute(), CommandInsertVehicle::unexecute(), CommandInsertTrafficSign::unexecute(), CommandInsertTrafficLight::unexecute(), and CommandInsertEnvObj::unexecute().

void OSGWindows::dropUnselectedObject (  TraffEduObject *  obj  ) 
 

removes the given object from the selected objects vector.

Parameters:
obj a TraffEduObject pointer.

Definition at line 634 of file OsgWindows.cpp.

References TraffEduObject::getObjectId(), TraffEduObject::getObjectType(), and selectedObjects.

Referenced by CommandDeselect::CommandDeselect().

void OSGWindows::fillSelectedObjects (  void   ) 
 

copies all the active objects in the objects vector to the selected objects vector.

Definition at line 624 of file OsgWindows.cpp.

References getObjects(), osgwind, and setSelectedObjects().

int OSGWindows::findReferenceFrame (  int  id  ) 
 

finds the frameId of the keyframe that is nearest to the frame that has frameId equals to the id.

Parameters:
id an integer argument.
Returns:
The frameId of the keyframe that is nearest to the frame that has frameId equals to the id

Definition at line 346 of file OsgWindows.cpp.

References frames.

Referenced by clickedOnAFrame().

bool OSGWindows::getAudioFlag (   ) 
 

shows if background music is inserted.

Returns:
Test result

Definition at line 653 of file OsgWindows.cpp.

References m_b_AudioInserted.

osg::ref_ptr< osg::Group > OSGWindows::getConstantRoot (   ) 
 

returns the main scene root of the environment.

Returns:
mainRoot

Definition at line 72 of file OsgWindows.cpp.

References mainRoot.

Referenced by addNewFrame(), changeCurrentFrame(), TraffEduObject::deleteObjectPAT(), CommandView::hideDispEnvObjs(), CommandView::hideDispTrafficLights(), CommandView::hideDispTrafficSigns(), CommandView::hideDispVehicles(), FileHandler::loadFile(), loadFrame(), AnimationWindow::loadSkyBox(), RoadForm::OnBnClickedButton10(), RightView::RightView(), and RightView::SetSceneData().

vector< TraffEduObject * > OSGWindows::getCopiedObjects (  void   ) 
 

returns the copied objects vector.

Returns:
copiedObjects vector

Definition at line 599 of file OsgWindows.cpp.

References copiedObjects.

Referenced by CommandPaste::CommandPaste(), and CommandCut::execute().

Frame * OSGWindows::getCurrentFrame (   ) 
 

returns the current frame.

Returns:
Pointer to the current frame

Definition at line 87 of file OsgWindows.cpp.

References currentFrameNum, and frames.

int OSGWindows::getCurrentFrameId (   ) 
 

returns the current frame id.

Returns:
ID of the current frame

Definition at line 20 of file OsgWindows.cpp.

References currentFrameNum.

Referenced by TraffEduObject::addTree(), TraffEduObject::display(), TraffEduObject::getPAT(), TraffEduObject::getPosition(), TraffEduObject::getRotate(), TraffEduObject::getScale(), OSGEventHandler::handle(), RoadForm::OnBnClickedButton10(), RightView::OnFreeplacerightmenuInserttext(), RightView::OnUpdateDikkat(), RightView::OnUpdateEnvironmentalobjectHouse(), RightView::OnUpdateEnvironmentalobjectHouse32909(), RightView::OnUpdateTrafficsignIlerimecburiyon32950(), RightView::OnUpdateTrafficsignIlerivasagamecburiyon32951(), RightView::OnUpdateTrafficsignIlerivesolamecburiyon32952(), RightView::OnUpdateTrafficsignIsikliisaretcihazi32932(), RightView::OnUpdateTrafficsignOndekitasitigecmekyasaktir32947(), RightView::OnUpdateTrafficsignSagadonulmez32944(), RightView::OnUpdateTrafficsignSagamecburiyon32948(), RightView::OnUpdateTrafficsignSaganayol32937(), RightView::OnUpdateTrafficsignSagasureklitehlikeliviraj32935(), RightView::OnUpdateTrafficsignSagasureklitehlikeliviraj32958(), RightView::OnUpdateTrafficsignSagatehlikeliviraj32933(), RightView::OnUpdateTrafficsignSoladonulmez32945(), RightView::OnUpdateTrafficsignSolamecburiyon32949(), RightView::OnUpdateTrafficsignSolanayol32942(), RightView::OnUpdateTrafficsignSolasureklitehlikeliviraj32936(), RightView::OnUpdateTrafficsignSolatehlikeliviraj32934(), RightView::OnUpdateTrafficsignSolatehlikeliviraj32957(), RightView::OnUpdateTrafficsignUdonusuyapilmaz32946(), RightView::OnUpdateTrafficsignYolver32931(), RightView::OnUpdateVehicleAutomobile(), RightView::OnUpdateVehicleTruck(), TraffEduObject::setPosition(), TraffEduObject::setRotate(), and TraffEduObject::setScale().

vector< TraffEduObject * > OSGWindows::getCutObjects (  void   ) 
 

returns the cut objects vector.

Returns:
cutObjects vector

Definition at line 580 of file OsgWindows.cpp.

References cutObjects.

Referenced by CommandPaste::CommandPaste(), and CommandCut::execute().

vector< Frame * > & OSGWindows::getFrames (  void   ) 
 

returns the frames vector in the environment.

Returns:
frames vector

Definition at line 47 of file OsgWindows.cpp.

References frames.

Referenced by TraffEduObject::addObjectPAT(), AnimationWindow::generateSeq(), TimelineEventHandler::paintGrey(), TimelineEventHandler::paintWhiteAll(), FileHandler::saveFile(), and Vehicle::Vehicle().

vector< TraffEduObject * > OSGWindows::getObjects (  void   ) 
 

returns the object vector in the environment.

Returns:
object vector

Definition at line 42 of file OsgWindows.cpp.

References objects.

Referenced by AnimationWindow::createConstantObjects(), CommandSelectAll::execute(), CommandSelect::execute(), CommandDeselectAll::execute(), CommandDeselect::execute(), AnimationWindow::exit(), fillSelectedObjects(), AnimationWindow::followVehicle(), CommandView::hideDispEnvObjs(), CommandView::hideDispTrafficLights(), CommandView::hideDispTrafficSigns(), CommandView::hideDispVehicles(), CommandSelectAll::unexecute(), and CommandDeselectAll::unexecute().

int OSGWindows::getOnDisplayFrameId (   ) 
 

returns the on display frame id.

Returns:
onDisplayFrameId

Definition at line 388 of file OsgWindows.cpp.

References onDisplayFrameId.

vector< TraffEduObject * > OSGWindows::getSelectedObjects (  void   ) 
 

returns the selected objects vector.

Returns:
selectedObjects vector

Definition at line 561 of file OsgWindows.cpp.

References selectedObjects.

Referenced by CommandCut::CommandCut(), CommandDelete::CommandDelete(), CommandRotate::CommandRotate(), CommandSelect::CommandSelect(), OSGEventHandler::drag(), and OSGEventHandler::rightClickMenu().

vector< textperFrame * > & OSGWindows::getTextArray (   ) 
 

returns the textArray vector in the environment.

Returns:
textArray vector

Definition at line 210 of file OsgWindows.cpp.

References textArray.

Referenced by CommandText::createTextGroup(), and RightView::OnFreeplacerightmenuInserttext().

osg::ref_ptr< osg::Group > OSGWindows::getTextRoot (   ) 
 

returns the text root of the environment.

Returns:
textRoot

Definition at line 77 of file OsgWindows.cpp.

References textRoot.

Referenced by RightView::OnFreeplacerightmenuInserttext().

osg::ref_ptr<osgProducer::Viewer> OSGWindows::getViewer (   )  [inline]
 

returns reference to the scene viewer.

Returns:
Reference to the viewer

Definition at line 137 of file OsgWindows.h.

References viewer.

Referenced by CommandCamera::ManipulateCamera(), RightView::OnPaint(), RightView::RenderFrame(), RightView::SetSceneData(), and RightView::~RightView().

BOOL OSGWindows::isModified (   ) 
 

a member method showing if GUICommandManager is awaken before.

Returns:
Test result

Definition at line 549 of file OsgWindows.cpp.

References eventHandler, and GUICommandManager::IsDirty().

void OSGWindows::loadFrame (  int  clickedFrameId  ) 
 

loads a new frame to the environment.

Parameters:
clickedFrameId an integer argument.

Definition at line 251 of file OsgWindows.cpp.

References currentFrameNum, getConstantRoot(), objects, osgwind, sortFrames(), and VEHICLE.

void OSGWindows::redo (   ) 
 

calls the Redo method of the GUICommandManager.

Definition at line 544 of file OsgWindows.cpp.

References eventHandler, and GUICommandManager::Redo().

int OSGWindows::returnIndex (  int  id  ) 
 

returns index of the frame that has frameId equal to the id.

Parameters:
id an integer argument.
Returns:
The index of the frame that has frameId equal to the id

Definition at line 115 of file OsgWindows.cpp.

References frames, and sizeOfFrames().

Referenced by TraffEduObject::addObjectPAT(), TraffEduObject::addTree(), TraffEduObject::display(), TraffEduObject::getPAT(), TraffEduObject::getPosition(), TraffEduObject::getRotate(), TraffEduObject::getScale(), TraffEduObject::setPosition(), TraffEduObject::setRotate(), and TraffEduObject::setScale().

void OSGWindows::setClickedFrameId (  int  id  ) 
 

sets clicked frame id.

Parameters:
id an integer argument.

Definition at line 29 of file OsgWindows.cpp.

References clickedFrameId.

void OSGWindows::setCopiedObjects (  TraffEduObject *  obj  ) 
 

add a new object to the copied objects vector.

Parameters:
obj a TraffEduObject pointer.

Definition at line 594 of file OsgWindows.cpp.

References copiedObjects.

void OSGWindows::setCopiedObjects (  void   ) 
 

copies all the objects in the selected objects vector to the cut objects vector.

Definition at line 585 of file OsgWindows.cpp.

References copiedObjects, and selectedObjects.

Referenced by CommandCopy::execute(), and CommandCut::unexecute().

void OSGWindows::setCurrentFrameId (  int  id  ) 
 

sets current frame id.

Parameters:
id an integer argument.

Definition at line 25 of file OsgWindows.cpp.

References currentFrameNum.

void OSGWindows::setCutObjects (  TraffEduObject *  obj  ) 
 

add a new object to the cut objects vector.

Parameters:
obj a TraffEduObject pointer.

Definition at line 575 of file OsgWindows.cpp.

References cutObjects.

void OSGWindows::setCutObjects (  void   ) 
 

moves all the objects in the selected objects vector to the cut objects vector.

Definition at line 566 of file OsgWindows.cpp.

References cutObjects, and selectedObjects.

Referenced by CommandCut::execute(), CommandPaste::unexecute(), and CommandCut::unexecute().

void OSGWindows::setOnDisplayFrameId (  int  id  ) 
 

sets on display frame id.

Parameters:
id an integer argument.

Definition at line 33 of file OsgWindows.cpp.

References onDisplayFrameId.

void OSGWindows::setSelectedObjects (  TraffEduObject *  obj  ) 
 

add a new object to the selected objects vector.

Parameters:
obj a TraffEduObject pointer.

Definition at line 555 of file OsgWindows.cpp.

References selectedObjects.

Referenced by CommandSelectAll::execute(), CommandSelect::execute(), fillSelectedObjects(), CommandDeselectAll::unexecute(), CommandDelete::unexecute(), and CommandCut::unexecute().

int OSGWindows::sizeOfFrames (   ) 
 

returns size of the frames vector.

Returns:
Size of the frames vector

Definition at line 82 of file OsgWindows.cpp.

References frames.

Referenced by TraffEduObject::addObjectPAT(), returnIndex(), Vehicle::setPositionAll(), and Vehicle::Vehicle().

void OSGWindows::sortFrames (   ) 
 

sorts the keyframes in the frames vector according to their frameId.

Definition at line 98 of file OsgWindows.cpp.

References frames.

Referenced by addNewFrame(), and loadFrame().

void OSGWindows::undo (   ) 
 

calls the Undo method of the GUICommandManager.

Definition at line 539 of file OsgWindows.cpp.

References eventHandler, and GUICommandManager::Undo().


Member Data Documentation

int OSGWindows::clickedFrameId [private]
 

a private variable. It holds id of the frame that is clicked from the timeline.

Definition at line 63 of file OsgWindows.h.

Referenced by addNewFrame(), canAddNewFrame(), canDeleteAFrame(), clickedOnAFrame(), OSGWindows(), and setClickedFrameId().

vector<TraffEduObject*> OSGWindows::copiedObjects [private]
 

a private vector of TraffEduObjects. It holds the copied objects in the environment

Definition at line 87 of file OsgWindows.h.

Referenced by clearCopiedObjects(), getCopiedObjects(), and setCopiedObjects().

Frame* OSGWindows::currentFrame [private]
 

a private variable. It holds pointer to the current frame.

Definition at line 39 of file OsgWindows.h.

int OSGWindows::currentFrameNum [private]
 

a private variable. It holds the current frame id.

Definition at line 33 of file OsgWindows.h.

Referenced by addNewFrame(), canAddNewFrame(), canDeleteAFrame(), changeCurrentFrame(), deleteFrame(), displayAFrame(), getCurrentFrame(), getCurrentFrameId(), loadFrame(), OSGWindows(), and setCurrentFrameId().

vector<TraffEduObject*> OSGWindows::cutObjects [private]
 

a private vector of TraffEduObjects. It holds the cut objects in the environment

Definition at line 93 of file OsgWindows.h.

Referenced by clearCutObjects(), getCutObjects(), and setCutObjects().

GUICommandManager* OSGWindows::eventHandler [private]
 

a private variable. It holds pointer to the event handler of the GUI.

Definition at line 75 of file OsgWindows.h.

Referenced by addCommandCut(), addCommandDelete(), addCommandInsertEnvObj(), addCommandInsertTrafficLight(), addCommandInsertTrafficSign(), addCommandInsertVehicle(), addCommandPaste(), addCommandRotate(), addCommandTranslate(), canRedo(), canUndo(), deleteFrame(), isModified(), OSGWindows(), redo(), and undo().

vector<Frame*> OSGWindows::frames [private]
 

a private vector of Frames. It holds key frames.

Definition at line 15 of file OsgWindows.h.

Referenced by addNewFrame(), canAddNewFrame(), canDeleteAFrame(), clearFrames(), deleteFrame(), displayAFrame(), findReferenceFrame(), getCurrentFrame(), getFrames(), returnIndex(), sizeOfFrames(), and sortFrames().

bool OSGWindows::m_b_AudioInserted
 

a private variable. It shows if background music is inserted into the environment or not.

Definition at line 101 of file OsgWindows.h.

Referenced by getAudioFlag(), RightView::OnFreeplacerightmenuInsertaudio(), RightView::OnUpdateFreeplacerightmenuInsertaudio(), and OSGWindows().

osg::ref_ptr<osg::Group> OSGWindows::mainRoot [private]
 

a private variable. It holds pointer to the main root of the scene.

Definition at line 51 of file OsgWindows.h.

Referenced by deleteFrame(), doAddGeode(), doDeleteGeode(), getConstantRoot(), and OSGWindows().

vector<TraffEduObject*> OSGWindows::objects [private]
 

a private vector of TraffEduObjects. It holds objects in the environment.

Definition at line 21 of file OsgWindows.h.

Referenced by addNewFrame(), addObject(), changeCurrentFrame(), clearObjects(), deleteFrame(), doAddGeode(), doDeleteGeode(), getObjects(), and loadFrame().

int OSGWindows::onDisplayFrameId [private]
 

a private variable. It holds id of the frame that is currently displayed.

Definition at line 69 of file OsgWindows.h.

Referenced by changeCurrentFrame(), clickedOnAFrame(), deleteFrame(), getOnDisplayFrameId(), OSGWindows(), and setOnDisplayFrameId().

vector<TraffEduObject*> OSGWindows::selectedObjects [private]
 

a private vector of TraffEduObjects. It holds the selected objects in the environment

Definition at line 81 of file OsgWindows.h.

Referenced by clearSelectedObjects(), dropUnselectedObject(), getSelectedObjects(), setCopiedObjects(), setCutObjects(), and setSelectedObjects().

vector< textperFrame *> OSGWindows::textArray [private]
 

a private vector of textperFrame. It holds information about texts inserted into the environment.

Definition at line 27 of file OsgWindows.h.

Referenced by getTextArray().

osg::ref_ptr<osg::Group> OSGWindows::textRoot [private]
 

a private variable. It holds pointer to the root that holds text information.

Definition at line 57 of file OsgWindows.h.

Referenced by getTextRoot(), and OSGWindows().

osg::ref_ptr<osgProducer::Viewer> OSGWindows::viewer [private]
 

a private variable. It holds pointer to the viewer of the scene.

Definition at line 45 of file OsgWindows.h.

Referenced by getViewer(), and OSGWindows().


The documentation for this class was generated from the following files:
Generated on Sun May 28 18:54:13 2006 for TraffEdu by  doxygen 1.4.6-NO